/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package rapc;

import jcolibri.cbrcore.Attribute;


/**
 *
 * @author Gianfranco
 */
public class descripteurBool implements descripteur{
    
    private String caseId;
    private String Nom;   
    private boolean norm;
    private boolean default_value;
    private String Explication;  
    private double poids=1;

    @Override
    public String toString()
    {
        return caseId+";"+Nom+";"+Explication+";"+norm+";"+ default_value+";"+ poids+";"+"Boolean";
    }
    
    @Override
    public String getNom()
    {
        return this.Nom;    
    }
    
    @Override
    public void setNom(String n)
    {
        this.Nom = n;
    }
    
    @Override
    public String getExplication()
    {
        return this.Explication;
    }
    
    @Override
    public void setExplication(String e)
    {
        this.Explication = e;
    }
    
    @Override
    public String getCaseId()
    {
        return this.caseId;
    }
    
    @Override
    public void setCaseId(String c)
    {
        this.caseId = c;
    }
    

    @Override
    public String getType()
    {
        return "boolean";   
    }
    
    public boolean getNorm()
    {
        return this.norm;
    }
    public void setNorm(boolean m)
    {
        this.norm = m;
    }

    public boolean getdefVal()
    {
        return this.default_value;
    }
    public void setdefVal(boolean m)
    {
        this.default_value = m;
    }

    public Attribute getIdAttribute() {
        return new Attribute("caseId", this.getClass());
    }

     public double getPoids() {
       return poids;
    }

    public void Poids(double n) {
        this.poids=n;
    }
    
    public float similariteDescripteur(descripteurBool source, descripteurBool cible,String a, String b)
    { System.out.println("boolean");
      System.out.println(a);
      System.out.println(b);
        if(a == null ? b == null : a.equals(b))
        {
            return 1;
        }
       return 0;
    }

    public float similariteDescripteur(descripteur get, descripteur get0, String a, String b)
    {
      return similariteDescripteur((descripteurBool)get,(descripteurBool) get0, a, b);
    }




    
}
